package saxon.util;

import com.mchange.v2.c3p0.ComboPooledDataSource;
import org.apache.commons.dbcp2.BasicDataSourceFactory;

import javax.sql.DataSource;
import java.io.InputStream;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.Properties;

public class c3p0Util {
    private static ComboPooledDataSource dataSource=null;
    static {
        try {
            dataSource =new  ComboPooledDataSource("MYSQL");
        } catch (Exception e) {
            e.printStackTrace ();
        }
    }

    public static Connection getConnection () throws SQLException {
        return dataSource.getConnection ();
    }
}
